using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace KeyCore.Domain.Model
{
    public class TelefonPrefix
    {
        public TelefonPrefix()
        {
            Telefon = new HashSet<Telefon>();
        }

        public int TelefonPrefixId { get; set; }
        public int TelefonPrefixNumer { get; set; }
        public string TelefonPrefixKraj { get; set; }

        public virtual ICollection<Telefon> Telefon { get; set; }
    }

    public class TelefonPrefixConfiguration : EntityTypeConfiguration<TelefonPrefix>
    {
        public TelefonPrefixConfiguration()
        {
            HasKey(k => k.TelefonPrefixId)
                .Property(p => p.TelefonPrefixId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
        }
    }
}